package irnode;

import symbol.Type;
import xyz.SimpleNode;

public class IRExp extends IRNode{
	protected Type expType; //pointer to correspond var symbol
	
	public IRExp(String name, SimpleNode node) {
		super(name, node);
		expType = null;
	}

	public IRExp(String name, SimpleNode node, IRNode parent) {
		super(name, node, parent);
		expType = null;
	}

	public Type getExpType() {
		return expType;
	}

	public void setExpType(Type expType) {
		this.expType = expType;
	}
	public String toString() {
		if(expType == null)
			return name + "(null)";
		return name + "("+ expType.getTypeName() +")";
	}
}
